package com.itheima.wemedia.feign;

import com.itheima.common.vo.ResultVo;
import com.itheima.wemedia.pojo.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 远程调用
 */
@FeignClient(name = "leadnews-wemedia",contextId = "wmUserFeign")
public interface WmUserFeign {
    /**
     * 远程调用自媒体
     */
    @PostMapping("/api/wmUser/add")
    ResultVo<WmUser> add(@RequestBody WmUser wmUser);

    /**
     * 通过appUserId查询自媒体账号的信息
     */
    @GetMapping("/api/wmUser/{appUserId}")
    ResultVo<WmUser> getByAppUserId(@PathVariable Long appUserId);
}
